package parser.symbol;

import java.util.ArrayList;

public class Function {
    private String name;
    private String type; // "int"或void
    private ArrayList<Symbol> params;

    public Function(String funcName, String funcType, ArrayList<Symbol> funcParams) {
        name = funcName;
        type = funcType;
        params = funcParams;
    }

    public String getName() {
        return name;
    }

    public ArrayList<Symbol> getParams() {
        return params;
    }

    public String getType() {
        return type;
    }

    @Override
    public String toString() {
        return "Function{" +
                "name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", params=" + params +
                "}\n";
    }
}
